import { ref } from 'vue'
import { defineStore } from 'pinia'

// showAdvertising
export const useAdvertisingStore = defineStore(
  'advertising',
  () => {
    const showAdvertising = ref(true)
    return { showAdvertising }
  },
  // 数据持久化
  {
    persist: {
      enabled: true,
      strategies: [
        {
          storage: sessionStorage,
          paths: ['showAdvertising']
        }
      ]
    }
  }
)
